package service;

import exception.BusinessException;
import model.Item;
import model.Order;
import model.OrderModificationRequest;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 订单服务接口
 */
public interface OrderService {
    /**
     * 创建订单
     */
    Order createOrder(List<Item> items, boolean isVIP) throws BusinessException;
    
    /**
     * 创建订单（带时间参数，用于测试）
     */
    Order createOrder(List<Item> items, boolean isVIP, LocalDateTime currentTime) throws BusinessException;
    
    /**
     * 取消订单
     */
    void cancelOrder(String orderId) throws BusinessException;
    
    /**
     * 取消订单（带时间参数，用于测试）
     */
    void cancelOrder(String orderId, LocalDateTime currentTime) throws BusinessException;

    Order modifyOrder(String orderId, OrderModificationRequest request);
}